
<div class="panel panel-default "
	style="margin-top: 2px; border-radius: 0px;">
	<div class="row" style="height: 100%">
		<div class="col-sm-2"
			style="height: 100%; padding-right: 0; padding-left: 2px;">
			<div class="panel panel-default collapse in"
				style="height: 100%; border-top: 0px; border-radius: 0px;">
				<div class="">
					<ul id="menu-tree" class="ztree "
						style="overflow: auto; height: 520px; padding: 15px;"
						data-toggle="ztree" 
						data-on-click="openMenu" >
						<!--:for(menu in menuList) { -->
							<li data-id="${menu.id}" data-pid="${menu.parentMenu}"
								data-url="menu/show" data-open="true" data-divid="#menu_main">${menu.Name}</li>
						<!--:}  -->
					</ul>
				</div>
			</div>
		</div>
		<div class="col-sm-10" style="padding-right: 0; padding-left: 2px;">
			<div class="panel panel-default collapse in ">
				<div class="panel-heading" style="padding: 4px 10px;">
				    <a class="btn btn-default" id="menu_new" onclick="newMenu()">新增</a> 
					
				</div>
				<div class="panel-body" style="height: 500px;">
					<div id="menu_main" style="height: 94%; overflow: hidden;">
					</div>
				</div>

			</div>

		</div>
	</div>
</div>
</div>
<script type="text/javascript">
	var menuId = '';
	function openMenu(event, treeId, treeNode) {
		menuId = treeNode.id;
		if (treeNode.isParent) {
			var zTree = $.fn.zTree.getZTreeObj(treeId)
			zTree.expandNode(treeNode)
		}
		$('#menu_main').bjuiajax('doLoad', {
			url : treeNode.url,
			data : {
				id : menuId
			},
			target : treeNode.divid
		})

		event.preventDefault()
	}
	function newMenu(){
		$('#menu_main').bjuiajax('doLoad', {
			url : '/menu/show',
			target :'#menu_main'
		})
   
	}
</script>